package com.dkm.ec.activity.repository;

import com.dkm.biz.repository.IRepository;
import com.dkm.ec.activity.domain.SecKillActivityPartin;
import com.dkm.ec.activity.persistence.entity.SecKillActivityPartinPo;

import java.util.List;

/**
 * Created by fanjinyuan on 2017/8/12.
 */
public interface SecKillActivityPartinRepository extends IRepository<String, SecKillActivityPartinPo, SecKillActivityPartin> {

    /**
     * 查找参与活动商品的列表
     * @param configId 参与活动配置id
     * @return
     */
    List<SecKillActivityPartinPo> findActivityGoods(String configId, int pageIndex, int pageSize);

    /**
     * 用于判断商家是否已参与指定活动
     * @param activityId
     * @param shopId
     * @return
     */
    Integer countForShopId(String activityId, String shopId);

    /**
     * 查询总页数
     * @param activityId
     * @return
     */
    Integer getTotalPage(String activityId, int pageSize);


}
